<template>
  <div id="app" v-wechat-title="$route.meta.title">
    <router-view></router-view>
  </div>
</template>

<script>
import $ from "jquery";

export default {
  name: "app",
  created() {
    this.setSession();
  },
  data() {
    return {
      scalseNum: 1 //默认缩放比例
    };
  },
  mounted() {
    //计算缩放比例
    this.resize_window();
    window.addEventListener("resize", () => {
      this.resize_window();
    });
  },

  methods: {
    //计算缩放比例
    resize_window() {
      let w_height = Number(
        document.documentElement.clientHeight /
          document.documentElement.clientWidth
      );
      this.scalseNum = w_height;
    },
    setSession() {
      window.sessionStorage.setItem("appKey", "mainSite");
    }
  }
};
</script>

<style lang="less">
@import "../../styles/common.css";
@import "../../styles/flex-layout.less";

#app {
  > div {
    height: 100%;
  }
}
</style>
<style lang="scss" scoped>
@import "../../styles/base.scss";
</style>
